﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace Mobile_VTBL
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                name: "Index",
                url: "",
                defaults: new { controller = "Home", action = "Index" }
                );

            routes.MapRoute(
                name: "category",
                url: "Danh-Muc/{id}/{Title}/{Page}",
                defaults: new { controller = "Category", action = "Index", id = 1, Page = UrlParameter.Optional }
                );

            routes.MapRoute(
                name: "Detail",
                url: "Chi-Tiet/{ID}/{Title}",
                defaults: new { controller = "Product", action = "Detail", ID = 1 }
                );

            routes.MapRoute(
                name: "Search",
                url: "Tim-Kiem",
                defaults: new { controller = "Product", action = "Search" }
                );
        }
    }
}